bitbucket-pipelines.yml: Change `make check` to `make distcheck`
Now that `make distcheck` should succeed, we can just use it as it
internally does `make check`. This patch changes the BitBucket
pipeline file to do so.
/*
*
* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include"internal.h"
#include"tls-certificate.h"
#include"debug.h"
#include"util.h"
/* Makes a filename path for a certificate. If id is NULL,
* just return the directory
*/
staticgchar*
make_certificate_path(constgchar*id)
{
returng_build_filename(purple_user_dir(),
"certificates","tls",
id!=NULL?purple_escape_filename(id):NULL,
NULL);
}
/* Creates the certificate directory if it doesn't exist,
* returns TRUE if it's successful or it already exists,
* returns FALSE if there was an error.
*/
staticgboolean
ensure_certificate_dir(GError**error)
{
gchar*dir=make_certificate_path(NULL);
gbooleanret=TRUE;
if(purple_build_dir(dir,0700)!=0){
g_set_error_literal(error,G_FILE_ERROR,
g_file_error_from_errno(errno),
g_strerror(errno));
ret=FALSE;
}
g_free(dir);
returnret;
}
GList*
purple_tls_certificate_list_ids()
{
gchar*dir_path;
GDir*dir;
constgchar*entry;
GList*idlist=NULL;
GError*error=NULL;
/* Ensure certificate directory exists */
if(!ensure_certificate_dir(&error)){
purple_debug_error("tls-certificate",
"Error creating certificate directory: %s",
error->message);
g_clear_error(&error);
returnNULL;
}
/* Open certificate directory */
dir_path=make_certificate_path(NULL);
dir=g_dir_open(dir_path,0,&error);
if(dir==NULL){
purple_debug_error("tls-certificate",
"Error opening certificate directory (%s): %s",
dir_path,error->message);
g_free(dir_path);
g_clear_error(&error);
returnNULL;
}
g_free(dir_path);
/* Traverse the directory listing and create an idlist */