Ubuntu PPA Maintenance Coordination

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ubuntu PPA Maintenance Coordination

Post by sgrogan »

I think, if this is a real git repo, we need a git packaging repo. Then the build recipes use these. For a release locally

Code: Select all

git checkout releases/FreeCAD-0-16
git push git+ssh://clhclh@git.launchpad.net/~freecad-maintainers/+git/gitmaster Release-0.16
Then change the recipe on the stable PPA to use Release-0.16 as source.
EDIT: Or do you mean a directory structure more like here: https://code.launchpad.net/~freecad-mai ... it/freecad
The code isn't there properly but I think we could do it, multiple branches under one repo? I can work on this, if it's what you mean. I think I've cracked the git <> LP code, it's a matter of getting the correct push url.
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

You still don't seem to have read the post I linked. Until you do I'm out.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ubuntu PPA Maintenance Coordination

Post by sgrogan »

I guess I'm missing something
(Sorry if I'm repeating what we've already discussed this in the [For Ubuntu PPA Maintainers] Uploading a Stable Release topic, but I think this is a more centralized place to discuss the whole PPA scope.)

On Launchpad, what we deal with is source packages. Source packages are recipes to build binary packages, which are the *.deb packages that can be installed from the console or in a package manager.

The imported bzr branch named "master" used to build the Daily Builds PPA doesn't sync anymore due to the Git signed commit bug. It is highly unlikely this will ever be fixed by the Launchpad people (the report is 3 ½ years old). Unless I'm missing something obvious, we'll have to push updates to Lanchpad manually, just like we do on the packaging branches.

With Launchpad now supporting Git repositories (still in Beta though), I believe it may be desirable to switch to a Git-only work flow rather than to continue using bzr branches.

I see a lot of advantages in this, the main one being, the FreeCAD developers and advanced users here know Git. None of them knows bazaar. With Git we can get support if we get into trouble. The other potential advantage would be that with a package built directly from a cloned Git repo rather than a bzr repo, we may no longer require a Versioning.git branch.

As for automating builds: it would be possible on Linux to write a script that pulls from freecad's github master, then pushes it to the Launchpad Git. This script could then be automated with cron, assuming one of us decides to keep a PC on permanently. Otherwise we just have to launch the script once a day which is no big deal.

The Debian Science Maintainers use Git, and I'm sure they know their stuff. This is where they develop source packages for FreeCAD: http://anonscm.debian.org/cgit/debian-s ... eecad.git/
I think all of this is addressed here: https://code.launchpad.net/~freecad-maintainers/+git
There is a gitmaster branch that can be mirrored by a cron job. git pull, git push PPA master
There is a packaging branch (also a git repo), right now its a copy of the trusty packaging bzr branch converted to git, but could be generalized to be universal.
In the summary view, you can see the following branches:

experimental: the repository where they test packages. Advanced debian users can install packages from the experimental repository.
jessie-backports: the backports repository for Debian Jessie users.
master: where their own debian development happens.
upstream: contains only the original FreeCAD source code of a specific release branch minus the "package" folder. It looks like they import a DFSG tarball (there's a script to do that in FreeCAD's source code).
This looks to work against a universal debian folder. Admittedly I'm green here. The "upstream" for us is the mirror of the FreeCAD source code.
If we try to replicate this work flow on Launchpad, and based on my failed experiments of the past week :D this is what I think would need to be set up:

The master branch needs to be like the Debian Science Maintainers one, with a "debian" folder at the root. Let's not make the mistake I did and get a "detached HEAD" because of a non-existent master!
Here is where the rubber meets the road.

The https://code.launchpad.net/~freecad-mai ... /gitmaster branch is a real git repo. I cloned it and it compiles locally. I assume I could modify it locally and "git commit" and push to change it. That's not the goal. At the next commit to FreeCAD master I can test, but I think, for me

Code: Select all

git pull
git push git+ssh://clhclh@git.launchpad.net/~freecad-maintainers/+git/gitmaster master
Will update the Launchpad git repo with no version change or rewriting of git history,

All that said it doesn't build https://code.launchpad.net/~clhclh/+rec ... usty-daily
The "Could not be uploaded correctly" was after the Successful build
The https://code.launchpad.net/~clhclh/+arc ... ld/9594922successful build failed due to copying problems with version.h.
The Could not be uploaded correctly error was after this commit https://git.launchpad.net/~freecad-main ... 607dcfedd1

The only alternative I see is to pull the debian folder from here: https://github.com/FreeCAD/FreeCAD/tree ... age/debian, after being mirrored to Launchpad.

This may also help me [url]ttps://wiki.debian.org/git-pbuilder[/url]
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ubuntu PPA Maintenance Coordination

Post by sgrogan »

NormandC wrote:You still don't seem to have read the post I linked. Until you do I'm out.
I've re-read it 4 times now and it's starting to sink in.
Placing the debian folder at root would kill the versioning. After git pull from FreeCAD master we would need to make the changes, then commit them locally and push to LaunchPad. The version will be different because there would be more commits. It looks like the Debian guys get around this by having versioning scripts in the scripts directory in the Debian folder. I now know where WCREV comes from.

Each subsequent git pull from FreeCAD master would merge the packaging folder, that would need to be deleted then commited, then push to Launchpad. This would kill the versioning. Maybe this could be added to the gitignore file at the outset so that LP would be one commit ahead of FreeCAD. blacey used this technique when developing the Travis stuff untill it was merged into master.

The advantage of a separate packing repo, at least in the short term, is that it does not pollute the "mirror of FreeCAD/master" with commits to the packaging repo.

In the longer term we could make a pull request to FreeCAD to place a maintained Debian Folder at root. The disadvantage is more maintenance of the official FreeCAD repo, the necessity of making pull requests to that repo to maintain the Debian folder.
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

f3nix wrote:

Code: Select all

ifeq ($(DEB_TARGET_ARCH),amd64)
        grep -rl '/usr/lib/libfreeimage.so' obj-$(DEB_BUILD_GNU_TYPE)/ |\
        xargs sed -i 's/\/usr\/lib\/libfreeimage.so/\/usr\/lib\/x86_64-linux-gnu\/libfreeimage.so/g'
endif
Sorry to bother you again Mateusz, but this only seem to fix the problem on x86_64. The bug affects also the i386 architecture.

See the list of files for the libfreeimage-dev i386 package: http://packages.ubuntu.com/xenial/i386/ ... v/filelist
File list of package libfreeimage-dev in xenial of architecture i386

/usr/include/FreeImage.h
/usr/lib/i386-linux-gnu/libfreeimage.so
/usr/share/doc/libfreeimage-dev/changelog.Debian.gz
/usr/share/doc/libfreeimage-dev/copyright
Would I just need to duplicate the whole ifeq/endif argument like this and place it underneath?

Code: Select all

ifeq ($(DEB_TARGET_ARCH),i386)
        grep -rl '/usr/lib/libfreeimage.so' obj-$(DEB_BUILD_GNU_TYPE)/ |\
        xargs sed -i 's/\/usr\/lib\/libfreeimage.so/\/usr\/lib\/i386-linux-gnu\/libfreeimage.so/g'
endif
I'll give it a try anyway.

Edit: good thing I'm test-building locally before uploading.

Code: Select all

debian/rules:30: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
Gah! Stupid copy-paste. :roll:
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

NormandC wrote:Would I just need to duplicate the whole ifeq/endif argument like this and place it underneath?
(...)
I'll give it a try anyway.
It worked with a package built locally, so I uploaded it to the Stable PPA. Xenial packages should be built in the next hour.

Thanks again, Mateusz!
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: Ubuntu PPA Maintenance Coordination

Post by f3nix »

NormandC wrote: It worked with a package built locally, so I uploaded it to the Stable PPA. Xenial packages should be built in the next hour.

Thanks again, Mateusz!
Great! :)
Glad I could help.

Cheers,
Mateusz
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

sgrogan wrote:Placing the debian folder at root would kill the versioning. After git pull from FreeCAD master we would need to make the changes, then commit them locally and push to LaunchPad. The version will be different because there would be more commits.
Yeah, you're right.
sgrogan wrote:In the longer term we could make a pull request to FreeCAD to place a maintained Debian Folder at root. The disadvantage is more maintenance of the official FreeCAD repo, the necessity of making pull requests to that repo to maintain the Debian folder.
Actually, years ago the debian folder was originally at root. Werner put it under "package" because it was the only way at the time to make the PPA work.

As for maintenance, it wouldn't be much different from what the Mac guys do, or the travis CI set up...

In a few years, all that stuff we do may migrate to snap packages anyway. Adding snaps for secure, transactional packages in Ubuntu 16.04 LTS
What's interesting with a snap package includes all necessary dependencies instead of relying on the system libraries.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

NormandC wrote:It worked with a package built locally, so I uploaded it to the Stable PPA. Xenial packages should be built in the next hour.
Dammit, I forgot to remove "1:" from the version. :evil:

We'll be stuck with 1:0.xx forever. :roll:
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Ubuntu PPA Maintenance Coordination

Post by jmaustpc »

NormandC wrote:
NormandC wrote:It worked with a package built locally, so I uploaded it to the Stable PPA. Xenial packages should be built in the next hour.
Dammit, I forgot to remove "1:" from the version. :evil:

We'll be stuck with 1:0.xx forever. :roll:
If you remove it quickly, it will effect fewer people. :)

Is the problem that removing 1 would make FreeCAD look to the package manager as an older version and hence not want to update?
Post Reply