Skip to content

Conversation

@alfrunes
Copy link
Contributor

@alfrunes alfrunes commented Jan 15, 2024

Fixed up the Makefile and added a simple script to build Debian package for amd64, arm64 and armhf.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
The default prefix paths are set to the Makefile defaults. If DESTDIR is
set, change the defaults to comply with Debian packaging.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
@alfrunes alfrunes force-pushed the ALV-223 branch 5 times, most recently from bfad95a to dd41123 Compare January 16, 2024 10:09
@alfrunes alfrunes changed the title ALV-223: CI/CD for building Debian packages ALV-223: CI for building Debian packages Jan 16, 2024
@alfrunes alfrunes force-pushed the ALV-223 branch 2 times, most recently from 87e347a to a91a086 Compare January 18, 2024 15:51
@alfrunes alfrunes changed the title ALV-223: CI for building Debian packages ALV-223: CI for building tarball packages Jan 18, 2024
@alfrunes
Copy link
Contributor Author

I changed the PR to only create tarballs that can be installed by tar -C / -xJf nt-connect-*.tar.xz

@lluiscampos
Copy link
Contributor

I changed the PR to only create tarballs that can be installed by tar -C / -xJf nt-connect-*.tar.xz

A tarball is as generic as it gets :)

The only think to take care of is the configuration file. This is likely for a user to modify and then it would be unexpected that upgrading to a new tarball will replace the file. This we can take care in the install script somehow.

I honestly think that it is the best for now given the requirements. We can always migrate to Debian or rpm packages later if we want something more streamlined.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
Makefile Outdated
dist: DESTDIR=dist/nt-connect_$(VERSION)_$(GOOS)_$(GOARCH)
dist:
@make DESTDIR=$(DESTDIR) -B install
tar -C $(DESTDIR) -czf $(DESTDIR).tar.gz .
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI all files are uploaded to the pipeline Artifacts:

image

Consider removing $(DESTDIR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, right! I'll instead install into a temporary directory and only create the tarballs in dist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just made it really simple by adding --remove-files to the tar command so it removes them as they are added to the archive.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
@alfrunes alfrunes merged commit 9892a4f into NorthernTechHQ:main Jan 19, 2024
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.

3 participants