afm-main 을 설치하기 위해 필요함


의존성 : libsqlite3-dev , smack , boost 


 sudo apt-get install libboost-program-options1.58-dev

 sudo apt-get install libcap-dev

sudo apt-get install sqlite3 libsqlite3-dev

sudo apt-get install systemd-journal-remote





./meta-agl/meta-security/recipes-security/security-manager/security-manager_git.bb

./meta-agl/meta-security/recipes-security/security-manager/security-manager.inc



./meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend

./meta-agl/meta-app-framework/recipes-security/security-manager/security-manager_git.bbappend


의존성 : attr boost cynara icu libcap smack sqlite3 sqlite3-native systemd 


git clone git://github.com/Samsung/security-manager.git


mater 

commit 10b062f317d5d5a7b88ed13242540e9034fd019f

Author: Piotr Sawicki <p.sawicki2@partner.samsung.com>

Date:   Fri Jun 30 12:02:34 2017 +0200


yocto 버전 860305a595d681d650024ad07b3b0977e1fcb0a6

패치적용

file://systemd-stop-using-compat-libs.patch \
file://security-manager-policy-reload-do-not-depend-on-GNU-.patch \
file://0001-Smack-rules-create-two-new-functions.patch \
file://0002-app-install-implement-multiple-set-of-smack-rules.patch \
file://c-11-replace-depracated-auto_ptr.patch \
file://socket-manager-removes-tizen-specific-call.patch \
file://Removing-tizen-platform-config.patch \
file://removes-dependency-to-libslp-db-utils.patch \

//libcap-without-pkgconfig.patch

//include-linux-xattr.patch



./meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend


 패치 추가  

file://0001-Adapt-rules-to-AGL.patch \

 file://init-security-manager-db.service \

 file://init-security-manager-db.sh \

 file://0001-Fix-gcc6-build.patch \

 file://0001-Fix-Cmake-conf-for-gcc6-build.patch \

 file://0001-gcc-7-requires-include-functional-for-std-function.patch





/init-security-manager-db.sh 추가


init-security-manager-db.service 서비스 추가


init-security-manager-db.service



./sys/fs/cgroup/unified/system.slice/security-manager.service



cmake -DCMAKE_VERBOSE_MAKEFILE=ON \

-DSYSTEMD_INSTALL_DIR= /home/linux/AGL/Install/service/systemd \

-DBIN_INSTALL_DIR=${bindir} \

-DCMAKE_INSTALL_PREFIX=${datadir} \

../




cmake -DCMAKE_INSTALL_PREFIX=/home/linux/AGL/Install/ ../


Error 

 

- Checking for modules 'libsystemd-journal;libsmack;db-util;cynara-admin;cynara-client'

--   No package 'libsystemd-journal' found

--   No package 'libsmack' found

--   No package 'db-util' found


$ sudo apt-get install sqlite3

$ sudo apt-get install systemd-journal-remote



cmake -DCMAKE_INSTALL_PREFIX=~/AGL/Install/ -DSYSTEMD_INSTALL_DIR=/home/linux/AGL/Install/service/systemd -DDB_INSTALL_DIR=/home/linux/AGL/Install/db -DSHARE_INSTALL_PREFIX=/home/linux/AGL/Install -DINCLUDE_INSTALL_DIR=/home/linux/AGL/Install/ -DBIN_INSTALL_DIR=/home/linux/AGL/Install/bin -DLIB_INSTALL_DIR=/home/linux/AGL/Install/lib -DVERSION=1.0.2  -DCMAKE_VERBOSE_MAKEFILE=ON ../


cmake -DCMAKE_INSTALL_PREFIX=/opt/libraryAGL -DSYSTEMD_INSTALL_DIR=/opt/libraryAGL/systemd -DDB_INSTALL_DIR=/opt/libraryAGL/db -DSHARE_INSTALL_PREFIX=/opt/libraryAGL/lib -DINCLUDE_INSTALL_DIR=/opt/libraryAGL/include -DBIN_INSTALL_DIR=/opt/libraryAGL/bin -DLIB_INSTALL_DIR=/opt/libraryAGL/lib -DVERSION=1.0.2  -DCMAKE_VERBOSE_MAKEFILE=ON ../

error getenv 

In file included from /home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/src/binary_queue.cpp:23:0:
/home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/include/dpl/binary_queue.h:36:14: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
 typedef std::unique_ptr<BinaryQueue> BinaryQueueAutoPtr;
              ^
/home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/include/dpl/binary_queue.h:288:13: error: ‘BinaryQueueAutoPtr’ does not name a type
     virtual BinaryQueueAutoPtr Read(size_t size);
             ^
/home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/src/binary_queue.cpp:289:1: error: ‘BinaryQueueAutoPtr’ does not name a type
 BinaryQueueAutoPtr BinaryQueue::Read(size_t size)

gcc 버전을 변경하여 빌드성공 -링크 github jlbancoc/Intall_gcc7_ubuntu_16.04.md

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gccg++ point to the newer version:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
                         --slave /usr/bin/g++ g++ /usr/bin/g++-7 
sudo update-alternatives --config gcc
gcc --version
g++ --version

db 관련 빌드 에러시 build/db 안에 db.sql 파일 복사및 해당 폴더에서 make 실행

Install the project...

/usr/bin/cmake -P cmake_install.cmake

-- Install configuration: ""

-- Up-to-date: /opt/libraryAGL/include/security-manager/security-manager.h

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-commons.so.1.0.2

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-commons.so.1

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-commons.so

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-client.so.1.0.2

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-client.so.1

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-client.so

-- Up-to-date: /opt/libraryAGL/bin/security-manager

-- Up-to-date: /opt/libraryAGL/bin/security-manager-cmd

-- Installing: /etc/gumd/useradd.d/50_security-manager-add.post

-- Installing: /etc/gumd/userdel.d/50_security-manager-remove.pre

-- Installing: /opt/libraryAGL/lib/pkgconfig/security-manager.pc

-- Installing: /opt/libraryAGL/systemd/security-manager.service

-- Installing: /opt/libraryAGL/systemd/security-manager.socket

-- Installing: /opt/libraryAGL/db/.security-manager.db

-- Installing: /opt/libraryAGL/db/.security-manager.db-journal

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-normal.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-system.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-admin.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-guest.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/app-rules-template.smack

-- Installing: /opt/libraryAGL/lib/security-manager/policy/privilege-group.list

-- Installing: /opt/libraryAGL/bin/security-manager-policy-reload 




'Yocto > AGL' 카테고리의 다른 글

[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] app-framework-binder  (0) 2018.10.10
[rpi] AGL Build  (0) 2018.10.08
[AGL] cynara  (0) 2018.08.14

+ Recent posts