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

build: fix packaging #330

Merged
merged 22 commits into from
Jan 31, 2025
Merged

Conversation

R1kaB3rN
Copy link
Member

No description provided.

@R1kaB3rN R1kaB3rN closed this Jan 12, 2025
@R1kaB3rN R1kaB3rN reopened this Jan 13, 2025
@R1kaB3rN R1kaB3rN closed this Jan 13, 2025
@R1kaB3rN R1kaB3rN reopened this Jan 14, 2025
@R1kaB3rN R1kaB3rN closed this Jan 14, 2025
@R1kaB3rN R1kaB3rN reopened this Jan 19, 2025
@R1kaB3rN R1kaB3rN force-pushed the fedora-pyzstd branch 3 times, most recently from 3fd7d20 to e985a71 Compare January 19, 2025 06:13
@R1kaB3rN R1kaB3rN force-pushed the fedora-pyzstd branch 3 times, most recently from d92d71d to d35ed3e Compare January 25, 2025 19:47
@R1kaB3rN R1kaB3rN changed the title build: prefer pyzstd package in fedora build: fix packaging Jan 25, 2025
@R1kaB3rN R1kaB3rN marked this pull request as ready for review January 25, 2025 22:48
@R1kaB3rN
Copy link
Member Author

@CosmicFusion do you have any insight on why the .deb build system removes the executable bits from shared library files? If possible I would like to remove the behavior and inspecting the GH action logs, I believe the cause is from dh_fixperms and I'm not sure if I've configured it correctly in the rules file.

Here's the rules file for debian:

#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
export DH_VERBOSE = 1

nproc = $(shell nproc)

### PYTHON TOPLEVEL WORKAROUND (REMOVE ONCE the umu install process properly respects PYTHONPATH)
toplevel_sitepackage = $(shell python3 -c "import site; print(site.getsitepackages()[0])")
###

PYTHONDIR = /usr/lib/python3/dist-packages


# See FEATURE AREAS in dpkg-buildflags(1).
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# See ENVIRONMENT in dpkg-buildflags(1).
# Package maintainers to append CFLAGS.
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# Package maintainers to append LDFLAGS.
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
	dh $@

override_dh_auto_configure:
	patch -p1 < packaging/deb/0001-deb-fix-build-by-using-rustup.patch
	./configure.sh --prefix=/usr
	
override_dh_auto_build:
	true

override_dh_auto_install:
	make -j$(nproc) DESTDIR=debian/tmp PYTHONDIR=$(PYTHONDIR) install
### PYTHON TOPLEVEL WORKAROUND (REMOVE ONCE the umu install process properly respects PYTHONPATH)
 ifneq ($(toplevel_sitepackage), $(PYTHONDIR))
	find debian/tmp/$(toplevel_sitepackage) -name "*.so" -exec chmod 0755 {} \;
	cp -av debian/tmp/$(toplevel_sitepackage)/* debian/tmp/$(PYTHONDIR)/
	rm -rvf debian/tmp/$(toplevel_sitepackage)/*
	find debian/tmp/$(toplevel_sitepackage)/../../../* -name "*.so" -exec chmod 0755 {} \;
	cp -av debian/tmp/$(toplevel_sitepackage)/../../../* debian/tmp/usr/
	rm -rvf debian/tmp/$(toplevel_sitepackage)/../../../*
 endif

override_dh_fixperms:
	dh_fixperms
	find debian/tmp/$(PYTHONDIR) -name "*.so" -exec chmod 0755 {} \;

###

@R1kaB3rN
Copy link
Member Author

Confirmed that the shared library files inside the Debian and Ubuntu artifacts have the permission set 0755 by overriding dh_fixperms. Artifacts links:

@R1kaB3rN R1kaB3rN merged commit a3d5702 into Open-Wine-Components:main Jan 31, 2025
12 checks passed
@R1kaB3rN R1kaB3rN deleted the fedora-pyzstd branch January 31, 2025 01:11
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until we can figure out how to get
submodules working correctly with the flake.

The flakeref query `submodules=1` _should_ fix this, but I couldn't get
it to work for some reason.
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until we can figure out how to get
submodules working correctly with the flake.

The flakeref query `submodules=1` _should_ fix this, but I couldn't get
it to work for some reason.
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until we can figure out how to get
submodules working correctly with the flake.

The flakeref query `submodules=1` _should_ fix this, but I couldn't get
it to work for some reason.
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until we can figure out how to get
submodules working correctly with the flake.

The flakeref query `submodules=1` _should_ fix this, but I couldn't get
it to work for some reason.
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules and is not needed
now that we provide pyzstd as a nix package.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules and is not needed
now that we provide pyzstd as a nix package.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules and is not needed
now that we provide pyzstd as a nix package.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules and is not needed
now that we provide pyzstd as a nix package.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?

That said, having the install targets listed explicitly allows the
`delta` targets to be conditional on `withDeltaUpdates`.
MattSturgeon added a commit to MattSturgeon/umu-launcher that referenced this pull request Jan 31, 2025
The umu-vendored make target depends on git submodules and is not needed
now that we provide pyzstd as a nix package.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?
R1kaB3rN pushed a commit that referenced this pull request Jan 31, 2025
* Use URL-like flake ref syntax for nixpkgs input

This is a purely cosmetic change.

* packaging/nix/flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/3df3c47c19dc90fec35359e89ffb52b34d2b0e94?narHash=sha256-30sOEZ8CFK2nTTMdkhaNrfVlIi3rWTNV0Z5z%2BNmpFNI%3D' (2025-01-06)
  → 'github:NixOS/nixpkgs/9a5db3142ce450045840cc8d832b13b8a2018e0c?narHash=sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw%3D' (2025-01-29)

* Refactor nix flake, based on overriding nixpkgs

Now that umu-launcher is being maintained in nixpkgs, it can be used as
a starting point for the nix package here. We just need to override a
few things, such as the `src`, and handle any changes that have not yet
made it into a release build.

The opportunity has been taken to clean up that package-args API:
- Renamed `truststore` to `withTruststore` with a warning.
- `cbor2` wasn't working, warn when it is used.
- Added `withDeltaUpdates`

Breaking changes:
- The umu-launcher package in the overlay is no longer the unwrapped
  package (previously in `umu-launcher.nix`).
- The derivation attrs for various packages are re-written from scratch,
  likely breaking users' custom overrides.

Non-breaking changes:
- The umu & umu-run packages have effectively been renamed umu-launcher.
- The flake outputs for all systems supported by the nixpkgs package.
- The package version now defaults to the flake's git revision.

* Warn when nix package version is set unnecessarily

The README used to recommend overriding `version = shortRev`, however we
now use `shortRev` by default.

Notify users of this change by warning when `version` is overridden to
the version we would've used anyway.

* Add pyzstd to nix package inputs

Removed `zstd` from inputs as it is a transitive dependency.

* Add urllib3 to nix package inputs

* Specify make targets explicitly in nix package

The umu-vendored make target depends on git submodules and is not needed
now that we provide pyzstd as a nix package.

Until now, it was disabled with a patch, however that broke in #330.

Instead of patching the makefile's `all` target, we can explicitly
specify the targets we want to build/install using make flags.

This is a temporary workaround until the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?
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.

1 participant