Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging/opensuse: sync with downstream packaging #14472

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bboozzoo
Copy link
Contributor

@bboozzoo bboozzoo commented Sep 5, 2024

Sync changes from openSUSE packaging.

Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?

Sync changes from openSUSE packaging.

Signed-off-by: Maciej Borzecki <[email protected]>
Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

Quick pass

@@ -90,45 +99,42 @@ Group: System/Packages
Url: https://%{import_path}
Source0: https://github.com/snapcore/snapd/releases/download/%{version}/%{name}_%{version}.vendor.tar.xz
Source1: snapd-rpmlintrc
Patch0: 0001-packaging-snapd.mk-drop-randomized-build-ID-generati.patch
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to apply this patch upstream as well?

BuildRequires: python3-docutils
BuildRequires: squashfs
# Due to: rpm -q --whatprovides /usr/share/pkgconfig/systemd.pc
BuildRequires: systemd
BuildRequires: pkgconfig(glib-2.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nice!

BuildRequires: fakeroot
BuildRequires: glib2-devel
BuildRequires: glibc-devel-static
BuildRequires: go >= 1.18
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious: does this mean we actually build with 1.18 on openSUSE (given that there are likely many versions in the archive?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're building with the default one, which varies between releases, eg. for TW it's 1.22 atm, but for 15.6 I believe it's 1.21.


#PIE static binaries are not supported on all architectures. We detect the availability of the runtime object here, and GCC's support for such binaries.
if test -e %{_libdir}/rcrt1.o && cc -static-pie -xc /dev/null -o /dev/null -S; then
patch -p1 < %SOURCE100
Copy link
Contributor

Choose a reason for hiding this comment

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

What is SOURCE100?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see Source100: near the top of the file

@@ -263,12 +267,29 @@ popd
all

%check
for binary in snap-exec snap-update-ns snapctl; do
ldd $binary 2>&1 | grep 'not a dynamic executable'
#These binaries execute inside the mount namespace thus they must be built statically
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick, add a space:

Suggested change
#These binaries execute inside the mount namespace thus they must be built statically
# These binaries execute inside the mount namespace thus they must be built statically

@@ -308,18 +329,22 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsnapd.seeded
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsnapd.apparmor
%endif

# Install Polkit configuration.
# TODO: This should be handled by data makefile.
install -pm 644 -D %{indigo_srcdir}/data/polkit/io.snapcraft.snapd.policy %{buildroot}%{_datadir}/polkit-1/actions
Copy link
Contributor

Choose a reason for hiding this comment

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

I just removed a bunch of this in Debian so I'm surprised this is here. Are not using the data makefiles?

@@ -308,18 +329,22 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsnapd.seeded
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsnapd.apparmor
%endif

# Install Polkit configuration.
# TODO: This should be handled by data makefile.
install -pm 644 -D %{indigo_srcdir}/data/polkit/io.snapcraft.snapd.policy %{buildroot}%{_datadir}/polkit-1/actions
Copy link
Contributor

Choose a reason for hiding this comment

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

I just removed a bunch of this in Debian so I'm surprised this is here. Are not using the data makefiles?

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

Quick pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants