You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/07/14 10:08:16 UTC

[GitHub] [incubator-kvrocks] tisonkun opened a new pull request, #729: x.py: support source packaging

tisonkun opened a new pull request, #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729

   Signed-off-by: tison <wa...@gmail.com>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
git-hulk commented on PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729#issuecomment-1185452786

   Thanks @tisonkun


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729#discussion_r920993770


##########
x.py:
##########
@@ -131,6 +131,36 @@ def cppcheck(args):
 
     run([command, *options, *sources])
 
+def package_source(args):
+    version = args.release_version.strip()
+    if SEMVER_REGEX.match(version) is None:
+        raise RuntimeError(f"Kvrocks version should follow semver spec, got: {version}")
+    
+    # 0. Write input version to VERSION file
+    with open('VERSION', 'w+') as f:
+        f.write(version)
+
+    # 1. Git commit and tag
+    git = find_command('git', msg='git is required for source packaging')
+    run([git, 'commit', '-a', '-m', f'[source-release] prepare release apache-kvrocks-{version}'], stdout=subprocess.PIPE)
+    run([git, 'tag', '-a', f'v{version}', '-m', '[source-release] copy for tag v{version}'], stdout=subprocess.PIPE)
+
+    tarball = f'apache-kvrocks-{version}.tar.gz'
+    # 2. Create the source tarball
+    output = run([git, 'ls-files'], stdout=subprocess.PIPE)
+    run(['xargs', 'tar', '-czf', tarball], stdin=output, stdout=subprocess.PIPE)
+
+    # 3. GPG Sign
+    gpg = find_command('gpg', msg='gpg is required for source packaging')
+    run([gpg, '--detach-sign', '--armor', tarball], stdout=subprocess.PIPE)
+
+    # 4. Generate sha512 checksum
+    sha512sum = find_command('sha512sum', msg='sha512sum is required for source packaging')
+    output = run([sha512sum, tarball], stdout=subprocess.PIPE)
+    payload = output.read().decode().strip()
+    with open(f'{tarball}.sha512', 'w+') as f:
+        f.write(payload)

Review Comment:
   FYI - You can verify checksum by `sha512sum -c ${tarball}.sha512`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on code in PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729#discussion_r921273033


##########
x.py:
##########
@@ -131,6 +131,36 @@ def cppcheck(args):
 
     run([command, *options, *sources])
 
+def package_source(args):
+    version = args.release_version.strip()
+    if SEMVER_REGEX.match(version) is None:
+        raise RuntimeError(f"Kvrocks version should follow semver spec, got: {version}")
+    
+    # 0. Write input version to VERSION file
+    with open('VERSION', 'w+') as f:
+        f.write(version)

Review Comment:
   I think we can just discard this file and pass the version to cmake directly, how do you think about this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729#discussion_r920991486


##########
x.py:
##########
@@ -131,6 +131,36 @@ def cppcheck(args):
 
     run([command, *options, *sources])
 
+def package_source(args):
+    version = args.release_version.strip()
+    if SEMVER_REGEX.match(version) is None:
+        raise RuntimeError(f"Kvrocks version should follow semver spec, got: {version}")
+    
+    # 0. Write input version to VERSION file
+    with open('VERSION', 'w+') as f:
+        f.write(version)
+
+    # 1. Git commit and tag
+    git = find_command('git', msg='git is required for source packaging')

Review Comment:
   We don't push anything to remote here. The release manager should manually `git push --tags` to push the tag.
   
   In my opinion the workflow should be:
   
   1. Checkout a staging branch - if we do lightweight release, it's possible to run on `unstable` branch.
   2. Run `./x.py package source` to get the source tarball, `.asc` sign file, `.sha512` checksum file.
   3. Copy those files to SVN (https://dist.apache.org/repos/dist/dev/incubator/kvrocks).
   4. Manually push tags (maybe we can have a `-rcN` tailer, but I don't make it too complex now.
   5. Calling a vote.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729#discussion_r920993260


##########
x.py:
##########
@@ -131,6 +131,36 @@ def cppcheck(args):
 
     run([command, *options, *sources])
 
+def package_source(args):
+    version = args.release_version.strip()
+    if SEMVER_REGEX.match(version) is None:
+        raise RuntimeError(f"Kvrocks version should follow semver spec, got: {version}")
+    
+    # 0. Write input version to VERSION file
+    with open('VERSION', 'w+') as f:
+        f.write(version)
+
+    # 1. Git commit and tag
+    git = find_command('git', msg='git is required for source packaging')
+    run([git, 'commit', '-a', '-m', f'[source-release] prepare release apache-kvrocks-{version}'], stdout=subprocess.PIPE)
+    run([git, 'tag', '-a', f'v{version}', '-m', '[source-release] copy for tag v{version}'], stdout=subprocess.PIPE)
+
+    tarball = f'apache-kvrocks-{version}.tar.gz'
+    # 2. Create the source tarball
+    output = run([git, 'ls-files'], stdout=subprocess.PIPE)
+    run(['xargs', 'tar', '-czf', tarball], stdin=output, stdout=subprocess.PIPE)
+
+    # 3. GPG Sign
+    gpg = find_command('gpg', msg='gpg is required for source packaging')
+    run([gpg, '--detach-sign', '--armor', tarball], stdout=subprocess.PIPE)

Review Comment:
   FYI - You can verify signature by `gpg --verify ${tarball}.asc ${tarball}`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729#issuecomment-1185490911

   Thanks for your reviews.
   
   Merging...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun merged pull request #729: x.py: support source packaging

Posted by GitBox <gi...@apache.org>.
tisonkun merged PR #729:
URL: https://github.com/apache/incubator-kvrocks/pull/729


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org