본문 바로가기
AndroidOverLinux

MPD WebClient : myMPD 설치후기

by ㅋㅋ잠자 2018. 9. 30.
반응형

안녕하세요. 좌돌 카페에서 추천받은 WebClient 를 올려 보았습니다.



github 주소는 아래와 같습니다.


https://github.com/jcorporation/mympd





1. 소스 받고 컴파일 결과


root@AOL-Debian:~# mympd /etc/mympd/mympd.conf

Parsing config file: /etc/mympd/mympd.conf

Starting myMPD 4.2.1

myMPD should not be run with root privileges


상기처럼 root 권한에서 실행하지 못하는 에러가 있어.. 소스를 직접 수정했습니다.


src/mympd.c 파일을 보시면 getuid() == root 구문이 있습니다.


        } else if (setuid(pw->pw_uid) != 0) {

            printf("setuid() failed\n");

            mg_mgr_free(&mgr);

            return EXIT_FAILURE;

        }

    }

    

//    if (getuid() == 0) {

//        printf("myMPD should not be run with root privileges\n");

//        mg_mgr_free(&mgr);

//        return EXIT_FAILURE;

//    }

    

    if (config.ssl == true)

        mg_set_protocol_http_websocket(nc_http);


컴파일을 새로 진행해 보았습니다. cmake 를 직접 하였는데요. mkdebian.sh 파일이 있는걸 삽질 후에 깨달아.. 스크립트로 돌려보았습니다.


root@AOL-Debian:~/myMPD# ./mkdebian.sh

cmake/

cmake/FindLibMPDClient.cmake

CMakeLists.txt

contrib/

contrib/archlinux.install

contrib/crcert.sh

contrib/myMPD.spec

contrib/mympd.1

contrib/mympd.conf.dist

contrib/mympd.service

debian/

debian/changelog

debian/control

debian/postinst

debian/postrm

debian/rules

debian/source/

debian/source/format

debian/source/options

dist/

dist/buildtools/

dist/buildtools/closure-compiler.jar

dist/buildtools/closure-stylesheets.jar

dist/htdocs/

dist/htdocs/css/

dist/htdocs/css/bootstrap.min.css

dist/htdocs/css/mympd.min.css

dist/htdocs/index.html

dist/htdocs/js/

dist/htdocs/js/bootstrap-native-v4.js

dist/htdocs/js/bootstrap-native-v4.min.js

dist/htdocs/js/mympd.min.js

dist/htdocs/js/player.min.js

dist/htdocs/player.html

dist/htdocs/sw.min.js

dist/src/

dist/src/frozen/

dist/src/frozen/LICENSE

dist/src/frozen/frozen.c

dist/src/frozen/frozen.h

dist/src/inih/

dist/src/inih/LICENSE

dist/src/inih/ini.c

dist/src/inih/ini.h

dist/src/mongoose/

dist/src/mongoose/LICENSE

dist/src/mongoose/mongoose.c

dist/src/mongoose/mongoose.h

htdocs/

htdocs/assets/

htdocs/assets/MaterialIcons-Regular.eot

htdocs/assets/MaterialIcons-Regular.ttf

htdocs/assets/MaterialIcons-Regular.woff

htdocs/assets/MaterialIcons-Regular.woff2

htdocs/assets/appicon-167.png

htdocs/assets/appicon-192.png

htdocs/assets/appicon-512.png

htdocs/assets/coverimage-httpstream.png

htdocs/assets/coverimage-notavailable.png

htdocs/assets/favicon.ico

htdocs/css/

htdocs/css/mympd.css

htdocs/index.html

htdocs/js/

htdocs/js/mympd.js

htdocs/js/player.js

htdocs/mympd.webmanifest

htdocs/player.html

htdocs/sw.js

LICENSE

mkclean.sh

mkdebian.sh

mkdebug.sh

mkrelease.sh

PKGBUILD

README.md

src/

src/config.h.in

src/mpd_client.c

src/mpd_client.h

src/mympd.c

dpkg-buildpackage: warning: using a gain-root-command while being root

dpkg-buildpackage: source package mympd

dpkg-buildpackage: source version 4.2.1-1

dpkg-buildpackage: source distribution stable

dpkg-buildpackage: source changed by Juergen Mang <mail@jcgames.de>

dpkg-buildpackage: host architecture armhf

 dpkg-source --before-build myMPD

dpkg-source: info: using options from myMPD/debian/source/options: --extend-diff-ignore=(\.git\/|\.github\/)

 fakeroot debian/rules clean

rm -rf release

 dpkg-source -b myMPD

dpkg-source: info: using options from myMPD/debian/source/options: --extend-diff-ignore=(\.git\/|\.github\/)

dpkg-source: info: using source format `3.0 (quilt)'

dpkg-source: info: building mympd using existing ./mympd_4.2.1.orig.tar.gz

dpkg-source: info: building mympd in mympd_4.2.1-1.debian.tar.xz

dpkg-source: info: building mympd in mympd_4.2.1-1.dsc

 debian/rules build

mkdir release

cd release; cmake -DCMAKE_INSTALL_PREFIX:PATH=../debian/tmp/usr -DCMAKE_BUILD_TYPE=RELEASE ..

-- The C compiler identification is GNU 4.9.2

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 

-- Found LibMPDClient: /usr/lib/libmpdclient.so  

-- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libssl.so;/usr/lib/arm-linux-gnueabihf/libcrypto.so (found versio

-- Configuring done

-- Generating done

-- Build files have been written to: /root/myMPD/release

make -C release

make[1]: Entering directory '/root/myMPD/release'

make[2]: Entering directory '/root/myMPD/release'

make[3]: Entering directory '/root/myMPD/release'

Scanning dependencies of target mympd

make[3]: Leaving directory '/root/myMPD/release'

make[3]: Entering directory '/root/myMPD/release'

[ 20%] Building C object CMakeFiles/mympd.dir/src/mympd.c.o

/root/myMPD/src/mympd.c: In function ‘inihandler’:

/root/myMPD/src/mympd.c:125:47: warning: unused parameter ‘section’ [-Wunused-parameter]

 static int inihandler(void* user, const char* section, const char* name, const char* value) {

                                               ^

/root/myMPD/src/mympd.c: In function ‘main’:

/root/myMPD/src/mympd.c:320:9: warning: ‘nc_http’ may be used uninitialized in this function [-Wmaybe-uninitiali

         mg_set_protocol_http_websocket(nc_http);

         ^

[ 40%] Building C object CMakeFiles/mympd.dir/src/mpd_client.c.o

/root/myMPD/src/mpd_client.c: In function ‘callback_mympd’:

/root/myMPD/src/mpd_client.c:74:16: warning: comparison between signed and unsigned integer expressions [-Wsign-

     if (cmd_id == -1)

                ^

/root/myMPD/src/mpd_client.c: In function ‘mympd_put_songs_in_album’:

/root/myMPD/src/mpd_client.c:1579:16: warning: ‘albumartist’ may be used uninitialized in this function [-Wmaybe

         len += json_printf(&out, "], totalEntities: %d, returnedEntities: %d, album: %Q, search: %Q, tag: %Q, c

                ^

[ 60%] Building C object CMakeFiles/mympd.dir/dist/src/mongoose/mongoose.c.o

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_add_conn’:

/root/myMPD/dist/src/mongoose/mongoose.c:2361:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %p", mgr, c));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c:2361:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_call’:

/root/myMPD/dist/src/mongoose/mongoose.c:2391:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p %s ev=%d ev_data=%p flags=0x%lx rmbl=%d smbl=%d", nc,

     ^

/root/myMPD/dist/src/mongoose/mongoose.c:2412:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p after %s flags=0x%lx rmbl=%d smbl=%d", nc,

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_destroy_conn’:

/root/myMPD/dist/src/mongoose/mongoose.c:2466:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     LOG(LL_DEBUG, ("%p 0x%lx %d", conn, conn->flags, destroy_if));

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_mgr_init_opt’:

/root/myMPD/dist/src/mongoose/mongoose.c:2545:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("init mgr=%p", m));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_mgr_free’:

/root/myMPD/dist/src/mongoose/mongoose.c:2560:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p", m));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_ssl_handshake’:

/root/myMPD/dist/src/mongoose/mongoose.c:2804:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p %d res %d", nc, server_side, res));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_if_accept_new_conn’:

/root/myMPD/dist/src/mongoose/mongoose.c:2841:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p %p %d %d", lc, nc, nc->sock, (int) nc->flags));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c:2841:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_if_accept_tcp_cb’:

/root/myMPD/dist/src/mongoose/mongoose.c:2847:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p %s://%s:%hu", nc, (nc->flags & MG_F_UDP ? "udp" : "tcp"),

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_recv_tcp’:

/root/myMPD/dist/src/mongoose/mongoose.c:2907:7: warning: format ‘%p’ expects argument of type ‘void *’, but arg

       DBG(("%p <- %d bytes (SSL)", nc, n));

       ^

/root/myMPD/dist/src/mongoose/mongoose.c:2925:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p <- %d bytes", nc, n));

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_recv_udp’:

/root/myMPD/dist/src/mongoose/mongoose.c:2994:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p <- %d bytes from %s:%d", nc, n, inet_ntoa(nc->sa.sin.sin_addr),

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_if_can_send_cb’:

/root/myMPD/dist/src/mongoose/mongoose.c:3033:9: warning: format ‘%p’ expects argument of type ‘void *’, but arg

         DBG(("%p -> %d bytes (SSL)", nc, n));

         ^

/root/myMPD/dist/src/mongoose/mongoose.c:3056:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p -> %d bytes", nc, n));

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_do_connect’:

/root/myMPD/dist/src/mongoose/mongoose.c:3083:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p %s://%s:%hu", nc, proto == SOCK_DGRAM ? "udp" : "tcp",

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_if_connect_cb’:

/root/myMPD/dist/src/mongoose/mongoose.c:3097:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG,

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_connect_opt’:

/root/myMPD/dist/src/mongoose/mongoose.c:3201:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG,

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_bind_opt’:

/root/myMPD/dist/src/mongoose/mongoose.c:3315:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %s %s,%s,%s", nc, address, (opts.ssl_cert ? opts.ssl_cert : "-"),

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_set_timer’:

/root/myMPD/dist/src/mongoose/mongoose.c:3445:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %p %d -> %lu", c, c->priv_2, (c->flags & MG_F_RESOLVING ? 1 : 0),

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_socket_if_connect_tcp’:

/root/myMPD/dist/src/mongoose/mongoose.c:3640:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p sock %d rc %d errno %d err %d", nc, nc->sock, rc, mg_get_errno(),

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_accept_conn’:

/root/myMPD/dist/src/mongoose/mongoose.c:3740:7: warning: format ‘%p’ expects argument of type ‘void *’, but arg

       DBG(("%p: failed to accept: %d", lc, mg_get_errno()));

       ^

/root/myMPD/dist/src/mongoose/mongoose.c:3749:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p conn from %s:%d", nc, inet_ntoa(sa.sin.sin_addr),

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_mgr_handle_conn’:

/root/myMPD/dist/src/mongoose/mongoose.c:3811:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p fd=%d fd_flags=%d nc_flags=0x%lx rmbl=%d smbl=%d", nc, nc->sock,

     ^

/root/myMPD/dist/src/mongoose/mongoose.c:3864:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p after fd=%d nc_flags=0x%lx rmbl=%d smbl=%d", nc, nc->sock,

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_socket_if_sock_set’:

/root/myMPD/dist/src/mongoose/mongoose.c:3892:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %d", nc, sock));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_socket_if_init’:

/root/myMPD/dist/src/mongoose/mongoose.c:3897:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p using select()", iface->mgr));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_ssl_if_conn_init’:

/root/myMPD/dist/src/mongoose/mongoose.c:4470:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %s,%s,%s", nc, (params->cert ? params->cert : ""),

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_ssl_if_ssl_err’:

/root/myMPD/dist/src/mongoose/mongoose.c:4552:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %p SSL error: %d %d", nc, ctx->ssl_ctx, res, err));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c:4552:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_ssl_if_read’:

/root/myMPD/dist/src/mongoose/mongoose.c:4573:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %d -> %d", nc, (int) buf_size, n));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_ssl_if_write’:

/root/myMPD/dist/src/mongoose/mongoose.c:4582:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %d -> %d", nc, (int) len, n));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_http_transfer_file_data’:

/root/myMPD/dist/src/mongoose/mongoose.c:6106:9: warning: format ‘%p’ expects argument of type ‘void *’, but arg

         DBG(("%p sent %d (total %d)", nc, (int) n, (int) pd->file.sent));

         ^

/root/myMPD/dist/src/mongoose/mongoose.c:6112:7: warning: format ‘%p’ expects argument of type ‘void *’, but arg

       LOG(LL_DEBUG, ("%p done, %d bytes", nc, (int) pd->file.sent));

       ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_http_handler’:

/root/myMPD/dist/src/mongoose/mongoose.c:6455:9: warning: format ‘%p’ expects argument of type ‘void *’, but arg

         LOG(LL_ERROR, ("%p recv buffer (%lu bytes) exceeds the limit "

         ^

/root/myMPD/dist/src/mongoose/mongoose.c:6467:7: warning: format ‘%p’ expects argument of type ‘void *’, but arg

       DBG(("%p %s %.*s %.*s", nc, addr, (int) hm->method.len, hm->method.p,

       ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_http_send_error’:

/root/myMPD/dist/src/mongoose/mongoose.c:6955:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p %d %s", nc, code, reason));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_http_serve_file’:

/root/myMPD/dist/src/mongoose/mongoose.c:6999:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p [%s] %.*s", nc, path, (int) mime_type.len, mime_type.p));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_scan_directory’:

/root/myMPD/dist/src/mongoose/mongoose.c:7625:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG, ("%p [%s]", nc, dir));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c:7639:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     LOG(LL_DEBUG, ("%p opendir(%s) -> %d", nc, dir, mg_get_errno()));

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_reverse_proxy_handler’:

/root/myMPD/dist/src/mongoose/mongoose.c:7769:5: warning: format ‘%p’ expects argument of type ‘void *’, but arg

     DBG(("%p: upstream closed", nc));

     ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_send_http_file’:

/root/myMPD/dist/src/mongoose/mongoose.c:8142:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   LOG(LL_DEBUG,

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_cgi_ev_handler’:

/root/myMPD/dist/src/mongoose/mongoose.c:9097:7: warning: format ‘%p’ expects argument of type ‘void *’, but arg

       DBG(("%p CLOSE", cgi_nc));

       ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_handle_cgi’:

/root/myMPD/dist/src/mongoose/mongoose.c:9113:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p [%s]", nc, prog));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_handle_ssi_request’:

/root/myMPD/dist/src/mongoose/mongoose.c:9352:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %s", nc, path));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_send_websocket_frame’:

/root/myMPD/dist/src/mongoose/mongoose.c:9941:3: warning: format ‘%p’ expects argument of type ‘void *’, but arg

   DBG(("%p %d %d", nc, op, (int) len));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_ws_handshake’:

/root/myMPD/dist/src/mongoose/mongoose.c:10057:3: warning: format ‘%p’ expects argument of type ‘void *’, but ar

   DBG(("%p %.*s %s", nc, (int) key->len, key->p, b64_sha));

   ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mqtt_handler’:

/root/myMPD/dist/src/mongoose/mongoose.c:10675:15: warning: format ‘%p’ expects argument of type ‘void *’, but a

               LOG(LL_ERROR, ("%p recv buffer (%lu bytes) exceeds the limit "

               ^

/root/myMPD/dist/src/mongoose/mongoose.c:10683:13: warning: format ‘%p’ expects argument of type ‘void *’, but a

             LOG(LL_ERROR, ("%p invalid len: %d, closing", nc, len));

             ^

/root/myMPD/dist/src/mongoose/mongoose.c: In function ‘mg_resolve_async_opt’:

/root/myMPD/dist/src/mongoose/mongoose.c:11899:3: warning: format ‘%p’ expects argument of type ‘void *’, but ar

   DBG(("%s %d %p", name, query, opts.dns_conn));

   ^

[ 80%] Building C object CMakeFiles/mympd.dir/dist/src/frozen/frozen.c.o


[100%] Building C object CMakeFiles/mympd.dir/dist/src/inih/ini.c.o

Linking C executable mympd

make[3]: Leaving directory '/root/myMPD/release'

[100%] Built target mympd

make[2]: Leaving directory '/root/myMPD/release'

make[1]: Leaving directory '/root/myMPD/release'

 fakeroot debian/rules binary

cd release; cmake -P cmake_install.cmake

-- Install configuration: "RELEASE"

-- Installing: /root/myMPD/release/../debian/tmp/usr/bin/mympd

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/man/man1/mympd.1

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/crcert.sh

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/mympd.service

-- Installing: /root/myMPD/release/../debian/tmp/usr/../etc/mympd/mympd.conf.dist

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/mympd.webmanifest

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/index.html

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/player.html

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/sw.min.js

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/js/player.min.js

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/js/bootstrap-native-v4.min.js

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/js/mympd.min.js

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/css/bootstrap.min.css

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/css/mympd.min.css

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/MaterialIcons-Regular.eot

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/MaterialIcons-Regular.ttf

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/MaterialIcons-Regular.woff

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/MaterialIcons-Regular.woff2

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/appicon-167.png

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/appicon-192.png

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/appicon-512.png

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/coverimage-httpstream.png

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/coverimage-notavailable.png

-- Installing: /root/myMPD/release/../debian/tmp/usr/share/mympd/htdocs/assets/favicon.ico

-- Installing: /root/myMPD/release/../debian/tmp/usr/../var/lib/mympd/pics

mkdir debian/tmp/DEBIAN

cp debian/postinst debian/tmp/DEBIAN

cp debian/postrm debian/tmp/DEBIAN

dpkg-gencontrol -pmympd

dpkg --build debian/tmp ..

dpkg-deb: building package `mympd' in `../mympd_4.2.1-1_armhf.deb'.

 dpkg-genchanges  >../mympd_4.2.1-1_armhf.changes

dpkg-genchanges: including full source code in upload

 dpkg-source --after-build myMPD

dpkg-source: info: using options from myMPD/debian/source/options: --extend-diff-ignore=(\.git\/|\.github\/)

dpkg-buildpackage: full upload (original source is included)


빌드가 끝나면 상위 폴더에 deb 파일이 생깁니다.


해당 deb 파일을 설치하면 아래와 같습니다.


root@AOL-Debian:~# dpkg -i mympd_4.2.1-1_armhf.deb

(Reading database ... 44965 files and directories currently installed.)

Preparing to unpack mympd_4.2.1-1_armhf.deb ...

Unpacking mympd (4.2.1-1) over (4.2.1-1) ...

removed ‘/usr/share/mympd/htdocs/pics’

removed ‘/usr/share/mympd/htdocs/library’

Setting up mympd (4.2.1-1) ...

Checking status of mympd system user and group

Fixing ownership of /var/lib/mympd

Trying to link musicdir to library

Linking pics directory

Installing systemd service

Operation failed: No such file or directory

mympd.conf installed as mympd.conf.dist

Certificates already created

myMPD installed

Edit /etc/mympd/mympd.conf before starting myMPD

Processing triggers for man-db (2.7.0.2-5) ...


다음으로 /etc/mympd/mympd.conf 파일을 수정합니다.


root@AOL-Debian:~# nano /etc/mympd/mympd.conf



#myMPD config file

#Connection to mpd
mpdhost = 127.0.0.1
mpdport = 6600
#mpdpass = 

#Webserver options
webport = 7701

#Enable ssl
ssl = false
sslport = 443
sslcert = /etc/mympd/ssl/server.pem
sslkey = /etc/mympd/ssl/server.key

#myMPD user
user = root

#Port for mpd http stream
streamport = 10001

#Name for coverimages
coverimage = folder.jpg

#myMPD statefile
statefile = /var/lib/mympd/mympd.state

#Enable mixramp settings
mixramp = false

#Enable usage of mpd stickers for play statistics and voting
stickers = true

#List of tags in myMPD gui
#Supported tags: Artist,Album,AlbumArtist,Title,Track,Genre,Date,Composer,Performer
taglist = Artist,Album,AlbumArtist,Title,Track,Genre,Date,Composer,Performer


일단 systemd 가 동작하지 않는 환경임으로 그냥 명령으로 실행해 보았습니다.


root@AOL-Debian:~# mympd /etc/mympd/mympd.conf

Parsing config file: /etc/mympd/mympd.conf

Starting myMPD 4.2.1

Document root: /usr/share/mympd/htdocs

Droping privileges to root

Listening on http port 7701

MPD Connecting to 127.0.0.1:6600

MPD connection: Timeout

MPD connection failed.

MPD Connecting to 127.0.0.1:6600

MPD connection: Timeout

MPD connection failed.

MPD Connecting to 127.0.0.1:6600

MPD connection: Timeout

MPD connection failed.

MPD Connecting to 127.0.0.1:6600

MPD connection: Timeout

MPD connection failed.

MPD Connecting to 127.0.0.1:6600

MPD connected.

MPD protocoll version: 0.19.0

MPD supported tags: Artist Album AlbumArtist Title Track Name Genre Date Composer Performer 

myMPD enabled tags: Artist Album AlbumArtist Title Track Genre Date Composer Performer 

Websocket request not to /ws, closing connection

Websocket request not to /ws, closing connection

Websocket request not to /ws, closing connection



상기처럼 실행이 되네요.





2. 실행 UI


UI 는 이쁘지만, 재생중인 파일의 TAG 의 앨범 이미지는 출력이 안되네요.


물론, 폴더 안에 있는 folder.jpg 이런 것은 잘 표시가 됩니다.













3. 배포 .. 및 마치며


혹시 원하는 분들이 많이 계시면 U5 용으로 deb 파일 만들어서 배포 하겠습니다.


감사합니다.


개인적으로는 그냥 ympd 가 더 좋은것 같네요.

반응형

댓글