Skip to content

glib2: Split package into separate library packages, to cut down on size#22544

Open
pnd10 wants to merge 2 commits intoopenwrt:masterfrom
pnd10:feature/split-glib2
Open

glib2: Split package into separate library packages, to cut down on size#22544
pnd10 wants to merge 2 commits intoopenwrt:masterfrom
pnd10:feature/split-glib2

Conversation

@pnd10
Copy link
Copy Markdown
Contributor

@pnd10 pnd10 commented Oct 29, 2023

Maintainer: Peter Wagner tripolar@gmx.at
Compile tested: ath79, TPlink TL-WDR3600, r24166+6-53039bf7f5
Run tested: ath79, TPlink TL-WDR3600, r24166+6-53039bf7f5, tested by installation and the fact that the gkrellmd package pulls in fewer libraries and the image is smaller
Description: In order to be able to reduce the installed size of anything that depends of GLib2.0, which has 5 component libraries, split the package into 5 separate packages, and a full version which depends on on the others to pull in all five. Also test the split by altering gkrellmd to only pull in the specific libraries that it actually depends on

@BKPepe
Copy link
Copy Markdown
Member

BKPepe commented Oct 30, 2023

CI is failing, but I am thinking about one thing related to your PR, which bothers me a lot.

Why? You are saying to cut down on size. What is the difference? Does it make any sense? Is it worth doing it after so many years like it is? Every year, the demand for HW resources is higher and higher. It is same for computer games.

@pnd10
Copy link
Copy Markdown
Contributor Author

pnd10 commented Oct 30, 2023 via email

@jmv2009
Copy link
Copy Markdown
Contributor

jmv2009 commented Oct 30, 2023

Uhhh, don't you need to figure out then which packages need what exactly? Unless you assign the full version to all of them...

@pnd10
Copy link
Copy Markdown
Contributor Author

pnd10 commented Oct 30, 2023

Uhhh, don't you need to figure out then which packages need what exactly? Unless you assign the full version to all of them...

Yes, ultimately. This can go in, first, without breaking anything, then packages that depend on glib2 can gradually be moved across to the fine-grained packages.

@BKPepe
Copy link
Copy Markdown
Member

BKPepe commented Oct 30, 2023

Let's go back on track. Multiple CI checks are failing.

  1. Formality one:
: === Checking commit '891ff7292b103fb5c06d8f9299db9703fa20ce5f'
: Author name (Peter Denison) seems ok
: Commit subject line MUST start with '<package name>: ' (Split glib2 package into separate library packages, to cut down on size)
: Signed-off-by is missing or doesn't match author (should be 'Signed-off-by: Peter Denison <openwrt@marshadder.org>')
  1. Compile ones:
Package glib2-gio is missing dependencies for the following libraries:
libgmodule-2.0.so.0
libgobject-2.0.so.0
make[2]: *** [Makefile:213: /builder/bin/packages/arm_cortex-a15_neon-vfpv4/packages_ci/glib2-gio_2.74.0-5_arm_cortex-a15_neon-vfpv4.ipk] Error 1
make[2]: Leaving directory '/feed/libs/glib2'
time: package/feeds/packages_ci/glib2/compile#0.47#0.30#0.62
    ERROR: package/feeds/packages_ci/glib2 failed to build.

@pnd10
Copy link
Copy Markdown
Contributor Author

pnd10 commented Oct 30, 2023

Let's go back on track. Multiple CI checks are failing.
1. Formality one:

: Commit subject line MUST start with '<package name>: ' (Split glib2 package into separate library packages, to cut down on size)
: Signed-off-by is missing or doesn't match author (should be 'Signed-off-by: Peter Denison <openwrt@marshadder.org>')

Apologies for this, should be easy to fix - shall I redo the commit and do a new PR? Or can this be fixed in this PR?

2. Compile ones:
Package glib2-gio is missing dependencies for the following libraries:
libgmodule-2.0.so.0
libgobject-2.0.so.0
make[2]: *** [Makefile:213: /builder/bin/packages/arm_cortex-a15_neon-vfpv4/packages_ci/glib2-gio_2.74.0-5_arm_cortex-a15_neon-vfpv4.ipk] Error 1
make[2]: Leaving directory '/feed/libs/glib2'
time: package/feeds/packages_ci/glib2/compile#0.47#0.30#0.62
    ERROR: package/feeds/packages_ci/glib2 failed to build.

Gah - that's a typo - I'll fix that when I fix the above.

@BKPepe
Copy link
Copy Markdown
Member

BKPepe commented Oct 30, 2023 via email

@pnd10 pnd10 force-pushed the feature/split-glib2 branch 2 times, most recently from a0ba7ad to 40872fd Compare October 30, 2023 22:43
@pnd10 pnd10 changed the title Split glib2 package into separate library packages, to cut down on size glib2: Split package into separate library packages, to cut down on size Oct 30, 2023
@stangri
Copy link
Copy Markdown
Member

stangri commented Oct 30, 2023

@BKPepe this PR modifies Makefiles for both admin/gkrellmd and lib/glib2. Would it not make sense to split into two separate commits, better yet PRs?

@pnd10
Copy link
Copy Markdown
Contributor Author

pnd10 commented Oct 30, 2023

@BKPepe this PR modifies Makefiles for both admin/gkrellmd and lib/glib2. Would it not make sense to split into two separate commits, better yet PRs?

I can certainly split into two commits if you think it would be clearer. I thought putting in one PR would make sense since the change to admin/gkrellmd is a template following the split on how to make use of the newly split packages. I'm happy to go with the consensus though.

@pnd10 pnd10 force-pushed the feature/split-glib2 branch from 40872fd to 3322d75 Compare October 31, 2023 17:58
@GeorgeSapkin
Copy link
Copy Markdown
Member

@pnd10 no updates in over two years, still relevant?

@pnd10
Copy link
Copy Markdown
Contributor Author

pnd10 commented Dec 15, 2025

@pnd10 no updates in over two years, still relevant?

Yes, I think it still is. I addressed all of the review comments, and it all went quiet. What do I have to do to actually have someone merge it, or should I just do it myself?

Copy link
Copy Markdown
Member

@pprindeville pprindeville left a comment

Choose a reason for hiding this comment

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

Needs PKG_RELEASE bumps but other than that looks okay.

Comment thread admin/gkrellmd/Makefile
Comment thread libs/glib2/Makefile
@pnd10 pnd10 force-pushed the feature/split-glib2 branch from 8b4d77a to 11ed41c Compare April 15, 2026 19:27
Copy link
Copy Markdown
Member

@pprindeville pprindeville left a comment

Choose a reason for hiding this comment

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

LGTM

pnd10 added 2 commits April 16, 2026 22:13
Existing package contains five libraries, some of which are > 1MB. Allow
packages which depend on only some of them to only pull in the ones they
need by splitting this package into finer-grained packages. Transition
can be done piecemeal as depending on glib2 will still pull in all the
libraries.

Signed-off-by: Peter Denison <openwrt@marshadder.org>
Following the split of glib2, depend on the more fine-grained packages
to reduce the installed size. Gkrellmd only needs to depend on the core glib2
library, gmodule and gthread, and not on gobject or gio.

Signed-off-by: Peter Denison <openwrt@marshadder.org>
@pnd10 pnd10 force-pushed the feature/split-glib2 branch from 11ed41c to 61d2e54 Compare April 16, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants