Adapt to cutefish

pull/1/head
reionwong 4 years ago
parent 9649f24766
commit 6040742b60

@ -0,0 +1,5 @@
{
"files.associations": {
"sailjail.h": "c"
}
}

@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.0)
cmake_policy(VERSION 3.0)
project(Applauncherd
VERSION 4.2.3
DESCRIPTION "A daemon that helps to launch applications faster")
project(cutefish-appmotor)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
@ -34,11 +32,11 @@ if ($ENV{DEBUG_BUILD})
endif ($ENV{DEBUG_BUILD})
# Set the program name defines. Must be at this level due to unit tests.
add_definitions(-DPROG_NAME_INVOKER="invoker")
add_definitions(-DPROG_NAME_SINGLE_INSTANCE="single-instance")
add_definitions(-DPROG_NAME_INVOKER="cutefish-invoker")
add_definitions(-DPROG_NAME_SINGLE_INSTANCE="cutefish-single-instance")
# applauncherd will try to load single-instance using this path
add_definitions(-DSINGLE_INSTANCE_PATH="/usr/bin/single-instance")
add_definitions(-DSINGLE_INSTANCE_PATH="/usr/bin/cutefish-single-instance")
# Disable debug logging, only error and warning messages get logged
# Currently effective only for invoker. Launcher part recognizes --debug
@ -55,17 +53,6 @@ endif ($ENV{BUILD_COVERAGE})
# Sub build: applauncherd
add_subdirectory(src)
# Target for documentation (make doc)
find_program(Doxygen NAMES doxygen)
if (EXISTS ${Doxygen})
add_custom_target(doc
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-impldoc.conf
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-userdoc.conf
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-mdeclarativecache.conf)
else (EXISTS ${Doxygen})
message(STATUS "Doxygen not found: you're not able to build documentation.")
endif (EXISTS ${Doxygen})
# Install html documentation
install(DIRECTORY doc/implementation-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
install(DIRECTORY doc/user-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)

@ -1,11 +0,0 @@
[Unit]
Description=Booster cgroup mounting service
Before=systemd-user-sessions.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/startup/booster-cgroup-mount
[Install]
WantedBy=multi-user.target

@ -1,101 +0,0 @@
* Sun Mar 10 2013 Carsten Munk <carsten.munk@jollamobile.com> - 4.0.1
- Using %exclude to remove files is not cool. Fixes build error with seperate
debuginfo
* Wed Feb 27 2013 Pekka Lundstrom <pekka.lundstrom@jollamobile.com> - 4.0.1
- Added notification to systemd when initialization is done.
Uses new command line parameter --systemd Fixes NEMO#637
[Robin Burchell]
- Fix NEMO#598: invoker segfaults when run without --type
* Thu Nov 15 2012 John Brooks <john.brooks@jollamobile.com> - 4.0.0
- Rename package to mapplauncherd
- Remove mbooster
- Remove all meegotouch dependencies and tests
- Build libapplauncherd as a real library with exported symbols for boosters
- Remove hardcoded booster types from invoker to allow external booster plugins
- Remove libmeegotouch from event handling (from Robin)
- remove aegis/creds code (from Robin)
* Thu Nov 1 2012 Robin Burchell <robin+mer@viroteck.net> - 3.0.3
- Pull lmt in to meegotouch-boostable.prf, required now we're the sole provider.
Fixes control panel build.
* Sat Sep 22 2012 Carsten Munk <carsten.munk@jollamobile.com> - 3.0.3
- Add systemd user session service file
* Wed Sep 19 2012 John Brooks <john.brooks@dereferenced.net> - 3.0.3
- Added 0001-Fix-invoker-infinite-loop-after-receiving-signals.patch
* Mon May 14 2012 Marko Saukko <sage@merproject.org> - 3.0.3
- Update to version 3.0.3
- Fixed compile with newer python with patch:
0001-Do-not-hardcode-python-version-to-cmd-s.patch
* Thu Jan 26 2012 Marko Saukko <marko.saukko@gmail.com> - 2.0.16
- Updated 0001-BMC22845-Move-var-run-to-home.patch to use env instead of hardcoded values.
* Fri Jan 20 2012 Marko Saukko <marko.saukko@cybercom.com> - 2.0.16
- Added 0001-Use-MeeGo-stuff-even-with-Mer.patch to fix build with /etc/mer-release.
* Mon Jan 16 2012 Marko Saukko <marko.saukko@cybercom.com> - 2.0.16
- Updated to version 2.0.16
* Wed Dec 21 2011 Marko Saukko <marko.saukko@cybercom.com> - 2.0.14
- Added meegotouch-applauncherd-2.0.14-add-missing-libs-for-linking.patch
to fix linking with newer toolchain.
* Thu Dec 15 2011 Marko Saukko <marko.saukko@cybercom.com> - 2.0.14
- Updated to version 2.0.14.
* Tue Nov 22 2011 Robin Burchell <robin+nemo@viroteck.net> - 2.0.13
- Updated to the latest upstream version.
- Remove unwanted patches, from MeeGo/Intel:
- 0001-New-Type-l-booster-for-meego-qml-launcher-QML-applic.patch
- 0001-Changes-separate-link-dlopen-library-configuration-f.patch
- 0002-Changes-lbooster-plugin-included-in-build.patch
- 0003-Changes-improved-booster-plugin-support-in-invoker.patch
- 0006-Cgroups-support-using-libcgroup.patch
- Remove unused/unwanted patches:
- fix_build.patch (unused)
- BMC14389_add_X-MEEGO-IVI.patch (we no longer have IVI)
* Wed Oct 05 2011 Marko Saukko <marko.saukko@cybercom.com> - 2.0.3
- Updated to the latest upstream version.
* Tue Sep 27 2011 Miroslav Safr <miroslav.safr@tieto.com> - 0.30.5
- added fix_build.patch and BMC_22845_move-var-run-to-home.patch
- upgrade to 0.30.5
* Wed Mar 16 2011 Jimmy Huang <jimmy.huang@intel.com> - 0.18.1
- Add BMC14389_add_X-MEEGO-IVI.patch - add the missing OnlyShowIn=X-MEEGO-IVI
in the desktop file to auto start meegotouch-applauncherd on IVI platforms
* Wed Feb 9 2011 Nimika Keshri <nimika.1.keshri@nokia.com> - 0.18.1
- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
* Mon Jan 17 2011 Jussi Lind <jussi.lind@nokia.com> - 0.17.0
- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
- Package description updated
- Change yaml file updated with various changes
* Fri Dec 17 2010 Nimika Keshri <nimika.1.keshri@nokia.com> - 0.15.10
- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
* Wed Dec 1 2010 Nimika Keshri <nimika.1.keshri@nokia.com> - 0.15.5
- BMC#10591 - meegotouch-applauncherd outdated in MeeGo
- Remove obsolete patch 0001-Changes-use-usr-bin-ruby-instead-of-usr-bin-ruby1.8-.patch
- Remove obsolete patch 0002-Changes-In-MeeGo-install-file-etc-xdg-autostart-appl.patch
- Change yaml file updated with various changes
* Thu Sep 2 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.12.1
- Updated to version 0.12.1.
- Packaged tests and test scripts as subpackages, reorganized testing
stuff to satisfy rpmlint.
- Included a .desktop file which kicks off applauncherd in a UI session.
* Wed Aug 25 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.10.3
- Updated to version 0.10.3.
* Wed Jul 14 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.8.0
- Initial packaging.

@ -1,104 +0,0 @@
Name: mapplauncherd
Summary: Application launcher for fast startup
Version: 4.2.3
Release: 1
License: LGPLv2+
URL: https://github.com/sailfishos/mapplauncherd
Source0: %{name}-%{version}.tar.bz2
Source1: booster-cgroup-mount.service
Requires: systemd-user-session-targets
Requires: sailjail
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires(pre): sailfish-setup
BuildRequires: extra-cmake-modules
BuildRequires: pkgconfig(libshadowutils)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: cmake
Provides: meegotouch-applauncherd > 3.0.3
Obsoletes: meegotouch-applauncherd <= 3.0.3
%description
Application invoker and launcher daemon that speed up
application startup time and share memory. Provides also
functionality to launch applications as single instances.
%package devel
Summary: Development files for launchable applications
Requires: %{name} = %{version}-%{release}
Provides: meegotouch-applauncherd-devel > 3.0.3
Obsoletes: meegotouch-applauncherd-devel <= 3.0.3
%description devel
Development files for creating applications that can be launched
using mapplauncherd.
%package cgroup
Summary: Service files for booster cgroup mount
Requires: %{name} = %{version}-%{release}
%description cgroup
Scripts and services files for application launcher to mount
booster cgroup at startup.
%prep
%autosetup -n %{name}-%{version}
%build
export BUILD_TESTS=1
export MEEGO=1
unset LD_AS_NEEDED
rm -f CMakeCache.txt
%cmake
%make_build
%install
%make_install
# Don't use %exclude, remove at install phase
rm -f %{buildroot}/usr/share/fala_images/fala_qml_helloworld
mkdir -p %{buildroot}%{_userunitdir}/user-session.target.wants
ln -s ../booster-generic.service %{buildroot}%{_userunitdir}/user-session.target.wants/
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -D -m 0755 %{SOURCE1} %{buildroot}%{_unitdir}/booster-cgroup-mount.service
mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
ln -s ../booster-cgroup-mount.service %{buildroot}%{_unitdir}/multi-user.target.wants/
install -D -m 0755 scripts/booster-cgroup-mount %{buildroot}/usr/lib/startup/booster-cgroup-mount
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%dir %{_datadir}/mapplauncherd
%dir %{_datadir}/mapplauncherd/privileges.d
%{_bindir}/invoker
%{_bindir}/single-instance
%{_libdir}/libapplauncherd.so.*
%attr(2755, root, privileged) %{_libexecdir}/mapplauncherd/booster-generic
%{_userunitdir}/booster-generic.service
%{_userunitdir}/booster-generic@.service
%{_userunitdir}/user-session.target.wants/booster-generic.service
%files devel
%defattr(-,root,root,-)
%{_includedir}/applauncherd/*
%{_libdir}/libapplauncherd.so
%{_libdir}/pkgconfig/*.pc
%files cgroup
%{_unitdir}/booster-cgroup-mount.service
%{_unitdir}/multi-user.target.wants/booster-cgroup-mount.service
# Intentionally hardcoded so that this always lives in the same place
%dir /usr/lib/startup
/usr/lib/startup/booster-cgroup-mount

@ -12,12 +12,12 @@ set(SRC invokelib.c invoker.c ${COMMON}/report.c search.c ${COMMON}/sailjail.c)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${DBUS_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${COMMON})
# Set precompiler flags
add_definitions(-DPROG_NAME_INVOKER="invoker")
add_definitions(-DPROG_NAME_INVOKER="cutefish-invoker")
# Set target
add_executable(invoker ${SRC})
add_executable(cutefish-invoker ${SRC})
target_link_libraries(invoker ${DBUS_LDFLAGS} ${GLIB_LDFLAGS})
target_link_libraries(cutefish-invoker ${DBUS_LDFLAGS} ${GLIB_LDFLAGS})
# Add install rule
install(TARGETS invoker DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
install(TARGETS cutefish-invoker DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})

@ -35,11 +35,11 @@ set_target_properties(applauncherd PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR})
# Configure and install the pkgconfig file
ecm_generate_pkgconfig_file(
BASE_NAME applauncherd
FILENAME_VAR applauncherd
DESCRIPTION ${PROJECT_DESCRIPTION}
INSTALL)
# ecm_generate_pkgconfig_file(
# BASE_NAME applauncherd
# FILENAME_VAR applauncherd
# DESCRIPTION ${PROJECT_DESCRIPTION}
# INSTALL)
# Add install rule
install(TARGETS applauncherd

@ -162,7 +162,7 @@ char *Connection::recvStr()
// Get the size.
uint32_t size = 0;
const uint32_t STR_LEN_MAX = 4096;
const uint32_t STR_LEN_MAX = 49152;
bool res = recvMsg(&size);
if (!res || size == 0 || size > STR_LEN_MAX)
{

@ -23,7 +23,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fPIC")
link_libraries(${DBUS_LDFLAGS})
# Set target
add_executable(single-instance ${SRC})
add_executable(cutefish-single-instance ${SRC})
# Add install rule
install(TARGETS single-instance DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
install(TARGETS cutefish-single-instance DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})

@ -0,0 +1,2 @@
libsystemd-dev
libcap-dev
Loading…
Cancel
Save