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

Install files to vendor location #260

Closed
wants to merge 2 commits into from
Closed

Install files to vendor location #260

wants to merge 2 commits into from

Conversation

crawfxrd
Copy link
Member

  • Package systemd service files should be installed to /usr/lib
  • Package DBus conf files should be installed to /usr/share
  • /etc should be used by sysadmins to create overrides.

Resolves: #255

@crawfxrd crawfxrd requested review from a team July 12, 2021 23:26
jackpot51
jackpot51 previously approved these changes Jul 13, 2021
@jacobgkau
Copy link
Member

I'm getting an error trying to upgrade to this version:

system76@pop-os:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  system76-power
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/749 kB of archives.
After this operation, 1,024 B disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 253036 files and directories currently installed.)
Preparing to unpack .../system76-power_1.1.16~1626132380~21.04~3716ca7_amd64.deb ...
Unpacking system76-power (1.1.16~1626132380~21.04~3716ca7) over (1.1.16~1626117109~21.04~e2c47ac) ...
dpkg: error processing archive /var/cache/apt/archives/system76-power_1.1.16~1626132380~21.04~3716ca7_amd64.deb (--unpack):
 unable to open '/usr/lib/systemd/system/system76-power.service.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Errors were encountered while processing:
 /var/cache/apt/archives/system76-power_1.1.16~1626132380~21.04~3716ca7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

@crawfxrd
Copy link
Member Author

crawfxrd commented Jul 14, 2021

Disabled dh_installsystemd to avoid the dpkg error. Installing/removing the service file is handled by the Makefile targets.

Used a maintscript file to move the old files to the new locations. (I don't know how this works going forward, though.)

jackpot51
jackpot51 previously approved these changes Jul 14, 2021
@jacobgkau
Copy link
Member

After upgrading from 5a46c86 (the current release) to 4ea0d7e, the files in /usr/ are present, but the files in /etc/ are also still present. Is this expected?

@crawfxrd
Copy link
Member Author

No, they should be moved. Likely due to specifying 1.1.17~ for the previous version.

jackpot51
jackpot51 previously approved these changes Jul 16, 2021
@jacobgkau
Copy link
Member

This failed to build on the build server:

cargo build "--release" "--frozen"
error: failed to get `clap` as a dependency of package `system76-power v1.1.18 (/<<PKGBUILDDIR>>)`

Caused by:
  attempting to make an HTTP request, but --frozen was specified
make[2]: *** [Makefile:60: target/release/system76-power] Error 101

It succeeded building locally, but I'm still not seeing the /etc/ files get moved/removed.

@crawfxrd
Copy link
Member Author

Yeah, I don't know why it's trying to fetch clap now if it was working earlier.

I think it will work with packages built by the build server; It works locally if I add a ~1 to the version.

@crawfxrd
Copy link
Member Author

override_dh_installsystemd somehow breaks vendoring?

@crawfxrd crawfxrd marked this pull request as draft July 20, 2021 22:05
@crawfxrd crawfxrd force-pushed the install-dirs branch 2 times, most recently from ee986ca to 6ebc718 Compare July 26, 2021 19:42
@crawfxrd
Copy link
Member Author

As far as I can tell, cargo vendor is either silently failing or just not running at all. vendor.tar.xz only contains an empty vendor/ folder.

@jacobgkau
Copy link
Member

This is working for placing the files in their new locations, but the old files are still not removed (using the staging package built by the build server.)

@crawfxrd crawfxrd force-pushed the install-dirs branch 2 times, most recently from 6f01ada to bd646d2 Compare November 24, 2021 17:35
jackpot51
jackpot51 previously approved these changes Nov 24, 2021
jackpot51
jackpot51 previously approved these changes Mar 3, 2022
crawfxrd and others added 2 commits March 22, 2022 11:04
- Package systemd service files should be installed to `/usr/lib`
- Package DBus conf files should be installed to `/usr/share`
- `/etc` should be used by sysadmins to create overrides.

Add a maintscript to remove the old files.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Leaving the service file in debian/ causes it to try to be handled by
dh_installsystemd, which causes errors with the Makefile handling it.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
@crawfxrd
Copy link
Member Author

Replaced by #327.

@crawfxrd crawfxrd closed this Mar 31, 2022
@crawfxrd crawfxrd deleted the install-dirs branch March 31, 2022 13:17
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.

More flexible make install paths
3 participants