Skip to content

lightdm: low dependency login/display manger #875

Merged
merged 2 commits into from
Dec 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions lightdm.be0
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/usr/bin/env beesh

# BEE_VERSION lightdm-1.26.0-0

SRCURL[0]="https://github.com/CanonicalLtd/lightdm/releases/download/${PKGVERSION}/lightdm-${PKGVERSION}.tar.xz"

# PATCHURL+=()

# EXCLUDE+=()

# build_in_sourcedir

# mee_extract() {
# bee_extract "${@}"
# }

# mee_patch() {
# bee_patch "${@}"
# }

mee_configure() {
DMUSER=gdm
ITSTOOL=/bin/true \
bee_configure \
--prefix=/usr \
--libexecdir=/usr/lib/lightdm \
--localstatedir=/var \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--docdir=/usr/share/doc/lightdm-${PKGVERSION} \
--disable-static \
Copy link
Collaborator

Choose a reason for hiding this comment

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

I’d prefer not specifying the default, to make the resulting configure line shorter.

lightdm-1.26.0-0/source/configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --sharedstatedir=/var --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --datarootdir=/usr/share --datadir=/usr/share --infodir=/usr/share/info --localedir=/usr/share/locale --mandir=/usr/share/man --docdir=/usr/share/doc/lightdm --exec-prefix=/usr --prefix=/usr --libexecdir=/usr/lib/lightdm --localstatedir=/var --sbindir=/usr/bin --sysconfdir=/etc --docdir=/usr/share/doc/lightdm-1.26.0 --disable-static --disable-tests --enable-liblightdm-qt=no --with-greeter-user=gdm --with-greeter-session=slick-greeter

--disable-tests \
--enable-liblightdm-qt=no \
--with-greeter-user=${DMUSER} \
--with-greeter-session=slick-greeter
}

# mee_build() {
# bee_build
# }

# mee_install() {
# bee_install
# }
## by default this may be 'make install DESTDIR="${D}"'

mee_install_post() {

sed '/bin\/sh/ a \\n. /etc/profile' ${S}/tests/src/lightdm-session > ${D}/usr/bin/lightdm-session
chmod 755 ${D}/usr/bin/lightdm-session
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are the default permissions?

$ ls -l /dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/usr/bin/
total 1400
-rwxr-xr-x 1 pmenzel pmenzel   54128 Aug 22 13:19 dm-tool
-rwxr-xr-x 1 pmenzel pmenzel 1370176 Aug 22 13:19 lightdm
-rw-r--r-- 1 pmenzel pmenzel     201 Aug 22 13:19 lightdm-session

Upstream bug https://github.com/CanonicalLtd/lightdm/issues/37 reported.

rm -rf ${D}/etc/init
install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm
install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm-data
install -v -dm755 -o gdm -g gdm ${D}/var/cache/lightdm
install -v -dm770 -o gdm -g gdm ${D}/var/log/lightdm
Copy link
Collaborator

Choose a reason for hiding this comment

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

This break building this bee file as a normal user.

[BEE] => entering mee_install_post() ..
install: creating directory ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var’
install: creating directory ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var/lib’
install: creating directory ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var/lib/lightdm’
install: cannot change owner and permissions of ‘/dev/shm/bee-pmenzel/lightdm/lightdm-1.26.0-0/image/var/lib/lightdm’: Operation not permitted


###############################################
# adjust settings in /etc/lightdm/lightdm.conf

sed -i -e '/^#greeter-hide-users=false/ c greeter-hide-users=true' \
-e '/^#sessions-directory/ c sessions-directory=/usr/share/xsessions' \
-e '/^#greeter-session/ c greeter-session=slick-greeter' \
${D}/etc/lightdm/lightdm.conf

sed -i -e '/^minimum-uid=/ c minimum-uid=100' \
-e '/^hidden-users=/ c hidden-users=nobody nobodyV' \
${D}/etc/lightdm/users.conf


######################
# create systemd unit

mkdir -p ${D}/etc/systemd/system
cat <<-UNIT > ${D}/etc/systemd/system/lightdm.service
[Unit]
Description=LightDM
Wants=nvidia.service
After=nvidia.service

[Service]
ExecStart=/usr/bin/lightdm
StandardOutput=syslog
Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably copied that from the GDM service unit, but I think it’s not needed.

Restart=always

[Install]
WantedBy=graphical.target
UNIT

chmod 644 ${D}/etc/systemd/system/lightdm.service

}