Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Add an RPM specfile #333

Merged
merged 8 commits into from
Jul 4, 2017
Merged

Conversation

kshlm
Copy link
Member

@kshlm kshlm commented Jul 3, 2017

No description provided.

@@ -13,6 +13,7 @@ fi
GOBUILD_TAGS="novirt noaugeas "
VERSION=$($(dirname $0)/pkg-version --full)
LDFLAGS="-X github.com/gluster/glusterd2/gdctx.GlusterdVersion=$VERSION"
LDFLAGS+=" -B 0x$(head -c20 /dev/urandom | od -An -tx1 | tr -d ' \n')"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, this would make the builds un-reproducible. As a result, maybe best to avoid doing this. More info here: https://reproducible-builds.org/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fedora requires this though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@purpleidea I was also looking for this sometime back and Go doesn't officially support reproducible builds yet.

@kshlm We should base build id based on git sha-1 eventually. https://fedoraproject.org/wiki/PackagingDrafts/Go#Build_ID

@purpleidea
Copy link

purpleidea commented Jul 3, 2017 via email

@kshlm
Copy link
Member Author

kshlm commented Jul 3, 2017

Can you provide more info about what this is and why?

https://fedoraproject.org/wiki/Releases/FeatureBuildId has some more info. Rpmbuild fails if the generated binaries are not tagged with a build-id.

@purpleidea
Copy link

purpleidea commented Jul 3, 2017 via email

@kshlm
Copy link
Member Author

kshlm commented Jul 3, 2017

A buildid is fine, but it should not be random. It should probably be based
off of the git sha1 of the commit.

Probably. But rpms are built from tarballs, not directly from git. I don't know how I could pass a git sha1 there.

@purpleidea
Copy link

purpleidea commented Jul 3, 2017 via email

kshlm added 2 commits July 3, 2017 19:47
and also change type of systemd service to the default (simple).
pushd src/%{import_path}
# Install vendored packages
# TODO: See if we can build with unbundled packages
make vendor-install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be as part of make dist. Good if we can avoid network calls during RPM/packaging create.

This is fine for current release, we can take care of this issue later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea. I'll do this next time. Makes is easier to do a release.

Copy link
Contributor

@prashanthpai prashanthpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging it. Basing build id on git sha-1 and making vendor install as part of make dist are the TODOs left out.

@prashanthpai prashanthpai merged commit 92bb106 into gluster:master Jul 4, 2017
@kshlm kshlm deleted the rpm-spec-and-requirements branch September 7, 2018 13:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants