diff --git a/configure.ac b/configure.ac index 93cfbde..9438ddb 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ test_gcc_flag() { # We use gnu99 instead of c99 because many have interpreted the standard # in a way that int64_t isn't defined on non-64 bit platforms. CFLAGS="-Os -std=gnu99 -Wall -W -Wextra -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -finline-small-functions -Wno-unused-result -fstack-protector -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now -fPIE -fpie -pie" +LDFLAGS="-z relro -z now" AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[Enable debug @<:@default=false@:>@]), [case "${enableval}" in diff --git a/debian/changelog b/debian/changelog index d79b86e..f286f7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +usb-moded (0.86.0) unstable; urgency=low + + * [ssu] Get device manufacturer and product name from ssu. Fixes JB#35156 + * [dbus] Handle missing mode setting gracefully. Fixes MER#1576 + * Bump version to enable to sync up with mer changes and get mer to use + upstream derived version numbering. + + -- Philippe De Swert Sun, 29 May 2016 15:19:26 +0300 + usb-moded (0.85.5) unstable; urgency=low * [network] Set max_leases in udhcpd configuration. Fixes JB#18566 diff --git a/rpm/usb-moded.spec b/rpm/usb-moded.spec index 205e473..6e4fb5e 100644 --- a/rpm/usb-moded.spec +++ b/rpm/usb-moded.spec @@ -359,7 +359,9 @@ install -m 755 -D systemd/turn-usb-rescue-mode-off %{buildroot}/%{_bindir}/turn- install -m 644 -D systemd/usb-rescue-mode-off.service %{buildroot}/lib/systemd/system/usb-rescue-mode-off.service install -m 644 -D systemd/usb-rescue-mode-off.service %{buildroot}/lib/systemd/system/graphical.target.wants/usb-rescue-mode-off.service install -m 644 -D systemd/usb-moded.conf %{buildroot}/%{_sysconfdir}/tmpfiles.d/usb-moded.conf - +install -m 644 -D systemd/adbd-prepare.service %{buildroot}/lib/systemd/system/adbd-prepare.service +install -m 644 -D systemd/adbd-prepare.service %{buildroot}/lib/systemd/system/graphical.target.wants/adbd-prepare.service +install -m 744 -D systemd/adbd-functionfs.sh %{buildroot}/usr/sbin/adbd-functionfs.sh %preun systemctl daemon-reload || : @@ -435,6 +437,9 @@ systemctl daemon-reload || : %{_sysconfdir}/usb-moded/run/adb-startserver.ini %{_sysconfdir}/usb-moded/run/adb-prepare.ini %{_sysconfdir}/usb-moded/run/udhcpd-adb-mode.ini +/lib/systemd/system/adbd-prepare.service +/lib/systemd/system/graphical.target.wants/adbd-prepare.service +/usr/sbin/adbd-functionfs.sh %files mtp-mode-android %defattr(-,root,root,-) diff --git a/src/usb_moded.c b/src/usb_moded.c index c7ca886..7188fe0 100644 --- a/src/usb_moded.c +++ b/src/usb_moded.c @@ -624,9 +624,11 @@ static void usb_moded_init(void) readlist(diag_mode); /* make sure all services are down when starting */ appsync_stop(1); - modelist = read_mode_list(diag_mode); #endif /* APP_SYNC */ + /* always read dyn modes even if appsync is not used */ + modelist = read_mode_list(diag_mode); + if(check_trigger()) trigger_init(); diff --git a/systemd/adbd-functionfs.sh b/systemd/adbd-functionfs.sh new file mode 100644 index 0000000..0e06cfd --- /dev/null +++ b/systemd/adbd-functionfs.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +mkdir -p /dev/usb-ffs +chmod 0770 /dev/usb-ffs +chown shell:shell /dev/usb-ffs +mkdir -p /dev/usb-ffs/adb +chmod 0770 /dev/usb-ffs/adb +chown shell:shell /dev/usb-ffs/adb +/bin/mount -t functionfs adb /dev/usb-ffs/adb -o uid=shell,gid=shell +exit 0 diff --git a/systemd/adbd-prepare.service b/systemd/adbd-prepare.service new file mode 100644 index 0000000..fe0eaf4 --- /dev/null +++ b/systemd/adbd-prepare.service @@ -0,0 +1,17 @@ +# Copyright (C) 2013 Jolla Oy +# +# Prepare functionfs for adbd + +[Unit] +Description=functionfs setup for adbd +Before=adbd.service +PartOf=adbd.service + +[Service] +Type=notify +RemainAfterExit=yes +ExecStart=/usr/sbin/adbd-functionfs.sh +ExecStop=/bin/umount adb + +[Install] +WantedBy=graphical.target